/**业务管理-运单列表API**/
import obj from '@/utils/request'
let {request,baseURL} = obj
//货物信息查询
export function getWorkworderGoods(params) {
  return request({
    url: '/workOrder/goods',
    method: 'get',
    params
  })
}
//分页查询运单信息
export function getWorkworderPage(data) {
  return request({
    url: '/workOrder/page',
    method: 'post',
    data
  })
}
//生成运单号
export function getWorkworderOrdercode(params) {
  return request({
    url: '/workOrder/orderCode',
    method: 'get',
    params
  })
}
//添加审核
export function addAudit(data) {
  return request({
    url: '/workOrder/audit',
    method: 'post',
    data
  })
}
//添加运单
export function addWorkworder(data) {
  return request({
    url: '/workOrder',
    method: 'post',
    data
  })
}
//修改运单
export function modWorkworder(data) {
  return request({
    url: '/workOrder',
    method: 'put',
    data
  })
}
//根据实际重量计算计费重量和运费
export function getBillWeight(goodsCostId,params) {
  return request({
    url: '/workOrder/billWeight/'+goodsCostId,
    method: 'get',
    params
  })
}
//导出运单
export function exportOrder(exportType){
  return baseURL + '/workOrder/export/'+exportType
}

//导出运单
export function exportIdcard(exportType){
  return baseURL + '/workOrder/export/card/'+exportType
}

//删除韵达
export function delWorkorder(data) {
  return request({
    url: '/workOrder',
    method: 'delete',
    data
  })
}
//批量修改运单状态
export function modWorkOrderStatus(status,data) {
  return request({
    url: '/workOrder/status/'+status,
    method: 'put',
    data
  })
}
//查询运单状态
export function getWorkOrderStatus(status,data) {
  return request({
    url: '/workOrder/status/',
    method: 'get',
  })
}
//打印运单
export function workOrderPrint(data) {
  return request({
    url: '/workOrder/print',
    method: 'post',
    data
  })
}
//所有模板文件下载
export function workOrderTemplate(data){
  return baseURL + '/workOrder/template/'+data
}
//选择文件---使用excel导入的运单号导出运单信息
export function workOrderExcelExport(data) {
  return baseURL + '/workOrder/excel/export/'+data
}
//选择文件---使用excel导入的运单号导出运单身份证信息
export function workOrderExcelExportCard(data) {
  return baseURL + '/workOrder/excel/export/card/'+data
}
//选择文件---使用excel导入的运单号打印运单信息
export function workOrderExcelPrint(data) {
  return request({
    url: '/workOrder/excel/print',
    method: 'post',
    data
  })
}

//选择文件---通过excel批量添加或者修改运单
export function workOrderExcelAddOrUpdate(data) {
  return request({
    url: '/workOrder/excel/addOrUpdate',
    method: 'post',
    headers: { 'No-Request-Loading': true },
    data
  })
}
//选择文件---使用excel批量修改运单分批状态
export function workOrderExcelStatus(data) {
  return request({
    url: '/workOrder/excel/status',
    method: 'post',
    headers: { 'No-Request-Loading': true },
    data
  })
}
//选择文件---匹配身份证
export function workOrderCardMatch(data) {
  return request({
    url: '/workOrder/card/match',
    method: 'post',
    data
  })
}
//禁用启用客户
export function disableOrEnableWorkOrder(ids,params) {
  return request({
    url: '/workOrder/disableOrEnable',
    method: 'put',
    data:ids,
    params
  })
}
//获取运单收费信息
export function getAmountInfo(storeId) {
  return request({
    url: '/workOrder/store/amountInfo/'+storeId,
    method: 'get',
  })
}
//复制运单
export function copyOrder(workOrderCode,copyNum) {
  return request({
    url: '/workOrder/copy/'+ workOrderCode +'/'+copyNum,
    method: 'post',
  })
}




